<template>
  <div v-if="bangdanId != null">
    <div class="allData" v-for="(item, i) in collectDataalls" :key="item.id">
      <div>
        <div>{{ bangdanId[i]?.name }}</div>
        <div @click="changeBangdan(bangdanId[i].name,i)">更多 <span>></span></div>
      </div>
      <div>
        <div v-for="e in 6" :key="e">
          <div @click="changeManhuua(item[e].comic_id)">
            <img  :src="item[e].vertical_cover + '@150w.jpg'" alt="" />
          </div>
          <div>{{ item[e].title }}</div>
        </div>
      </div>
    </div>
    <div> </div>
    <BottomNavigationBar></BottomNavigationBar>
  </div>
</template>


<script>
import BottomNavigationBar from "@/views/BottomNavigationBar.vue";

export default {
  data() {
    return {
      msg:'已经被榨干了(> == <)'
    };
  },
  components: {
    BottomNavigationBar: BottomNavigationBar,
  },
  props: {
    bangdanId:{
      type:Array
    },
    collectDataalls: {
      type: Array,
    },
  },
  methods: {
   
    
    changeManhuua(id){
      this.$emit("change-manhuua", id);
    },

    changeBangdan(name,id){
      this.$emit('change-bangdan',{name,id})
      this.$router.push(`/collect/nv?name=${name}&id=${id}`)
    }
  },

  created() {
  },
};
</script>

<style lang="less" scoped>
.allData {
  width: 335rem;
  margin: 0 auto;
  > div:nth-child(1) {
    display: flex;
    justify-content: space-between;
    margin-top: 20rem;
    > div:nth-child(1) {
      color: @color4;
      font-size: 16rem;
    }
    > div:nth-child(2) {
      color: @color;
      font-size: 14rem;
    }
  }
  > div:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 15rem;
    > div {
      width: 100rem;
      font-size: 12rem;
      color: @color4;

      img {
        width: 100rem;
        border-radius: 5rem;
      }
      > div:nth-child(2) {
        height: 30rem;
        line-height: 25rem;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
  }
}
</style>